﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace lydoe
{
    public class facebookInt
    {
        public static bool GetLikePage(Facebook.FacebookClient fb, string sPageId)
        {
            bool bLike = false;
            var melike = (IDictionary<string, object>)fb.Get("me/likes");
            var o = melike["data"];
            var o2 = ((Facebook.JsonArray)o);
            foreach (Facebook.JsonObject ojs in o2)
            {
                if ((string)ojs["id"] == sPageId)
                {
                    bLike = true;
                    break;
                }
            }
            return bLike;
        }
    }
}
